<%--
  Created by IntelliJ IDEA.
  User: 86131
  Date: 2023/8/11
  Time: 10:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>电影影院</title>
    <script rel="script" src="${path}/js/jquery-3.6.4.js"></script>
    <link rel="stylesheet" type="text/css" href="${path}/css/yycontent.css">
    <style>
        #back3{
            background-color: #ef4238;
        }
    </style>
</head>
<body>
<%@include file="header.jsp"%>
    <div id="bigbox">
        <div id="fl">
            <div class="fe">
                <div>品牌：</div>
                <ul class="ul1">
                    <li id="quan1" onclick="bian(this)">全部</li><li onclick="bian(this)">万达影城</li><li onclick="bian(this)">金逸影城</li><li onclick="bian(this)">MC影城</li><li onclick="bian(this)">芒果影业</li>
                    <li onclick="bian(this)">中影星美国际影城</li><li onclick="bian(this)">CGV影城</li><li onclick="bian(this)">星轶starx影城</li><li onclick="bian(this)">横店影视</li>
                    <li onclick="bian(this)">恒大嘉凯影城</li><li onclick="bian(this)">华耀国际影城</li><li onclick="bian(this)">完美世界影城</li><li onclick="bian(this)">华夏国际影城</li>
                    <li onclick="bian(this)">中影国际影城<li><li onclick="bian(this)">保利国际影城</li><li onclick="bian(this)">博纳国际影城</li><li onclick="bian(this)">太平洋电影城</li>
                    <li onclick="bian(this)">万象影城</li><li onclick="bian(this)">卢米埃影城</li><li onclick="bian(this)">沃美影城</li><li onclick="bian(this)">中影UL城市影院</li>
                    <li onclick="bian(this)">中影佰纳国际影城</li><li onclick="bian(this)">大地影院</li><li onclick="bian(this)">哈艺时尚影城</li><li onclick="bian(this)">UME国际影城</li>
                    <li onclick="bian(this)">保利万和国际影城</li><li onclick="bian(this)">泰禾影城</li><li onclick="bian(this)">中影南方国际影城</li><li onclick="bian(this)">其他</li>
                </ul>
            </div>
            <div class="fe" id="fe1">
                <div id="di">行政区：</div>
                <ul class="ul2">
                    <li id="quan2" onclick="xinzhen(this)">全部</li><li onclick="xinzhen(this)">地铁附近</li><li onclick="xinzhen(this)">岳麓区</li><li onclick="xinzhen(this)">雨花区</li><li onclick="xinzhen(this)">浏阳市</li>
                    <li onclick="xinzhen(this)">长沙县</li><li onclick="xinzhen(this)">芙蓉区</li><li onclick="xinzhen(this)">开福区</li><li onclick="xinzhen(this)">天心区</li><li onclick="xinzhen(this)">望城区</li>
                    <li onclick="xinzhen(this)">宁乡市</li>
                </ul>
            </div>
            <div class="fe" id="san">
                <div id="ying">影厅类型：</div>
                <ul id="tin">
                    <li id="quan3" onclick="yintin(this)">全部</li><li onclick="yintin(this)">IMAX厅</li><li onclick="yintin(this)">CGS中国巨幕厅</li><li onclick="yintin(this)">杜比全景声厅</li>
                    <li onclick="yintin(this)">RealD厅</li><li onclick="yintin(this)">LUXE巨幕厅</li><li onclick="yintin(this)">4DX厅</li><li onclick="yintin(this)">DTS:X 临境音厅</li>
                    <li onclick="yintin(this)">儿童厅</li><li onclick="yintin(this)">4K厅</li><li onclick="yintin(this)">4D厅</li>
                    <li onclick="yintin(this)">120帧/4K厅</li><li onclick="yintin(this)">巨幕厅</li><li onclick="yintin(this)">STARX厅</li><li onclick="yintin(this)">CINITY厅</li>
                    <li onclick="yintin(this)">MX4D厅</li><li onclick="yintin(this)">激光厅</li><li onclick="yintin(this)">ALPD Pro高亮厅</li>
                </ul>
            </div>
            <div class="fe" id="si">
                <div id="fu">影院服务：</div>
                <ul id="ting">
                    <li id="quan4" onclick="yinyuan(this)">全部</li><li onclick="yinyuan(this)">可改签</li><li onclick="yinyuan(this)">可退票</li>
                </ul>
            </div>
        </div>
        <div id="yin">
            <p class="jie"><span class="shu"> | </span> <span id="shi">影院列表</span></p>
            <div id="yuan">
                <c:set var="pageList" value="${sessionScope.pageList}"/>
                <c:set var="CinemaPage" value="${sessionScope.CinemaPage}"/>
                <c:choose>
                    <c:when test="${empty pageList || empty CinemaPage}">
                        <script>window.location="${path}/CinemaServlet?prom=show";</script>
                    </c:when>
                    <c:otherwise>
                        <form action="${path}/CinemaServlet?prom=select" method="post">
                            <c:forEach items="${pageList}" var="page">
                                <ul id="${page.cinema_id}" class="ul">
                                    <li >${page.cinema_name}</li>
                                    <li id="se">地址：${page.cinema_address}</li>
                                    <li id="qian"><span id="red">￥${page.cinema_money}</span><span id="qi">起</span></li>
                                    <input type="button" class="payPiao" value="选择购票" id="gou" onclick="selCinema(${page.cinema_id})">
                                </ul>
                            </c:forEach>
                        </form>
                        <div id="page">
                            <c:if test="${sessionScope.CinemaPage.currPageNo>1}">
                                <form method="post" action="${path}/CinemaServlet?prom=show&pageIndex=${CinemaPage.currPageNo-1}">
                                    <input type="submit" value="上一页" class="n1" >
                                </form>
                            </c:if>
                            <c:if test="${CinemaPage.currPageNo==1}">
                                <form method="post" action="${path}/CinemaServlet?prom=show&pageIndex=1">
                                    <input style="background-color: red;color: white"  class="numbers" type="submit" value="1" class="n1">
                                </form>
                                <form   method="post" action="${path}/CinemaServlet?prom=show&pageIndex=2">
                                    <input class="numbers" type="submit" value="2" class="n1">
                                </form>
                                <form   method="post" action="${path}/CinemaServlet?prom=show&pageIndex=3">
                                    <input class="numbers" type="submit" value="3" class="n1">
                                </form>
                            </c:if>
                            <c:if test="${CinemaPage.currPageNo==2}">
                                <form method="post" action="${path}/CinemaServlet?prom=show&pageIndex=1">
                                    <input class="numbers" type="submit" value="1" class="n1">
                                </form>
                                <form   method="post" action="${path}/CinemaServlet?prom=show&pageIndex=2">
                                    <input  style="background-color: red;color: white"  class="numbers" type="submit" value="2" class="n1">
                                </form>
                                <form   method="post" action="${path}/CinemaServlet?prom=show&pageIndex=3">
                                    <input    class="numbers" type="submit" value="3" class="n1">
                                </form>
                            </c:if>
                            <c:if test="${CinemaPage.currPageNo==3}">
                                <form method="post" action="${path}/CinemaServlet?prom=show&pageIndex=1">
                                    <input class="numbers" type="submit" value="1" class="n1">
                                </form>
                                <form   method="post" action="${path}/CinemaServlet?prom=show&pageIndex=2">
                                    <input  class="numbers" type="submit" value="2" class="n1">
                                </form>
                                <form   method="post" action="${path}/CinemaServlet?prom=show&pageIndex=3">
                                    <input  style="background-color: red;color: white"  class="numbers" type="submit" value="3" class="n1">
                                </form>
                            </c:if>
                            <c:if test="${sessionScope.CinemaPage.currPageNo<sessionScope.CinemaPage.totalPageCount}">
                                <form method="post" action="${path}/CinemaServlet?prom=show&pageIndex=${CinemaPage.currPageNo+1}">
                                    <input type="submit" value="下一页" class="n1">
                                </form>
                            </c:if>
                        </div>
                    </c:otherwise>
                </c:choose>
            </div>
        </div>
    </div>
<%@include file="footer.jsp"%>
<script>
    function selCinema(cinema_id){
        window.location="${path}/CinemaServlet?prom=select&cinema_id="+cinema_id;
    }
    function bian(a) {
        $(".ul1 li").css({"background-color":"white","color":"black","border-radius":"5px"});
        $("#quan1").css("color","black");
        $(a).css({"background-color":"#ef4238","color":"white"});
    }
    function xinzhen(a){
        $(".ul2 li").css({"background-color":"white","color":"black","border-radius":"5px"});
        $("#quan2").css("color","black");
        $(a).css({"background-color":"#ef4238","color":"white"});
    }
    function yintin(a){
        $("#tin li").css({"background-color":"white","color":"black","border-radius":"5px"});
        $("#quan3").css("color","black");
        $(a).css({"background-color":"#ef4238","color":"white"});
    }
    function yinyuan(a){
        $("#ting li").css({"background-color":"white","color":"black","border-radius":"5px"});
        $("#quan4").css("color","black");
        $(a).css({"background-color":"#ef4238","color":"white"});
    }
</script>
</body>
</html>
